home *** CD-ROM | disk | FTP | other *** search
/ This Disc Bytes! / Power Computing - The Disc 2 - This Disc Bytes.ISO / mac / CodeWarrior 7 Lite for 68K / MacOS Support / Headers / Universal Headers / ImageCompression.h < prev    next >
Text File  |  1995-07-06  |  34KB  |  688 lines

  1. /*
  2.      File:        ImageCompression.h
  3.  
  4.      Contains:    QuickTime Image Compression Interfaces.
  5.  
  6.      Version:    Technology:    QuickTime 2.0
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __IMAGECOMPRESSION__
  21. #define __IMAGECOMPRESSION__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <QuickdrawText.h>                                    */
  34.  
  35. #ifndef __QDOFFSCREEN__
  36. #include <QDOffscreen.h>
  37. #endif
  38. /*    #include <Errors.h>                                            */
  39.  
  40. #ifndef __COMPONENTS__
  41. #include <Components.h>
  42. #endif
  43.  
  44. #ifndef __WINDOWS__
  45. #include <Windows.h>
  46. #endif
  47. /*    #include <Memory.h>                                            */
  48. /*    #include <Events.h>                                            */
  49. /*        #include <OSUtils.h>                                    */
  50. /*    #include <Controls.h>                                        */
  51. /*        #include <Menus.h>                                        */
  52.  
  53. #ifndef __STANDARDFILE__
  54. #include <StandardFile.h>
  55. #endif
  56. /*    #include <Dialogs.h>                                        */
  57. /*        #include <TextEdit.h>                                    */
  58. /*    #include <Files.h>                                            */
  59. /*        #include <Finder.h>                                        */
  60.  
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64.  
  65. #if PRAGMA_ALIGN_SUPPORTED
  66. #pragma options align=mac68k
  67. #endif
  68.  
  69. #if PRAGMA_IMPORT_SUPPORTED
  70. #pragma import on
  71. #endif
  72.  
  73. struct MatrixRecord {
  74.     Fixed                            matrix[3][3];
  75. };
  76. typedef struct MatrixRecord MatrixRecord, *MatrixRecordPtr;
  77.  
  78. struct FixedPoint {
  79.     Fixed                            x;
  80.     Fixed                            y;
  81. };
  82. typedef struct FixedPoint FixedPoint;
  83.  
  84. struct FixedRect {
  85.     Fixed                            left;
  86.     Fixed                            top;
  87.     Fixed                            right;
  88.     Fixed                            bottom;
  89. };
  90. typedef struct FixedRect FixedRect;
  91.  
  92. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  93.  
  94. enum {
  95.     codecInfoDoes1                = (1L << 0),
  96.     codecInfoDoes2                = (1L << 1),
  97.     codecInfoDoes4                = (1L << 2),
  98.     codecInfoDoes8                = (1L << 3),
  99.     codecInfoDoes16                = (1L << 4),
  100.     codecInfoDoes32                = (1L << 5),
  101.     codecInfoDoesDither            = (1L << 6),
  102.     codecInfoDoesStretch        = (1L << 7),
  103.     codecInfoDoesShrink            = (1L << 8),
  104.     codecInfoDoesMask            = (1L << 9),
  105.     codecInfoDoesTemporal        = (1L << 10),
  106.     codecInfoDoesDouble            = (1L << 11),
  107.     codecInfoDoesQuad            = (1L << 12),
  108.     codecInfoDoesHalf            = (1L << 13),
  109.     codecInfoDoesQuarter        = (1L << 14),
  110.     codecInfoDoesRotate            = (1L << 15),
  111.     codecInfoDoesHorizFlip        = (1L << 16),
  112.     codecInfoDoesVertFlip        = (1L << 17),
  113.     codecInfoDoesSkew            = (1L << 18),
  114.     codecInfoDoesBlend            = (1L << 19),
  115.     codecInfoDoesWarp            = (1L << 20),
  116.     codecInfoDoesRecompress        = (1L << 21),
  117.     codecInfoDoesSpool            = (1L << 22),
  118.     codecInfoDoesRateConstrain    = (1L << 23)
  119. };
  120.  
  121. enum {
  122.     codecInfoDepth1                = (1L << 0),
  123.     codecInfoDepth2                = (1L << 1),
  124.     codecInfoDepth4                = (1L << 2),
  125.     codecInfoDepth8                = (1L << 3),
  126.     codecInfoDepth16            = (1L << 4),
  127.     codecInfoDepth32            = (1L << 5),
  128.     codecInfoDepth24            = (1L << 6),
  129.     codecInfoDepth33            = (1L << 7),
  130.     codecInfoDepth34            = (1L << 8),
  131.     codecInfoDepth36            = (1L << 9),
  132.     codecInfoDepth40            = (1L << 10),
  133.     codecInfoStoresClut            = (1L << 11),
  134.     codecInfoDoesLossless        = (1L << 12),
  135.     codecInfoSequenceSensitive    = (1L << 13)
  136. };
  137.  
  138. enum {
  139.     codecFlagUseImageBuffer        = (1L << 0),
  140.     codecFlagUseScreenBuffer    = (1L << 1),
  141.     codecFlagUpdatePrevious        = (1L << 2),
  142.     codecFlagNoScreenUpdate        = (1L << 3),
  143.     codecFlagWasCompressed        = (1L << 4),
  144.     codecFlagDontOffscreen        = (1L << 5),
  145.     codecFlagUpdatePreviousComp    = (1L << 6),
  146.     codecFlagForceKeyFrame        = (1L << 7),
  147.     codecFlagOnlyScreenUpdate    = (1L << 8),
  148.     codecFlagLiveGrab            = (1L << 9),
  149.     codecFlagDontUseNewImageBuffer = (1L << 10),
  150.     codecFlagInterlaceUpdate    = (1L << 11),
  151.     codecFlagCatchUpDiff        = (1L << 12),
  152.     codecFlagUsedNewImageBuffer    = (1L << 14),
  153.     codecFlagUsedImageBuffer    = (1L << 15)
  154. };
  155.  
  156. enum {
  157. /* The minimum data size for spooling in or out data */
  158.     codecMinimumDataSize        = 32768
  159. };
  160.  
  161. enum {
  162.     compressorComponentType        = 'imco',                        /* the type for "Components" which compress images */
  163.     decompressorComponentType    = 'imdc'
  164. };
  165.  
  166. typedef Component CompressorComponent;
  167.  
  168. typedef Component DecompressorComponent;
  169.  
  170. typedef Component CodecComponent;
  171.  
  172. #define anyCodec ((CodecComponent)0)
  173. #define bestSpeedCodec ((CodecComponent)-1)
  174. #define bestFidelityCodec ((CodecComponent)-2)
  175. #define bestCompressionCodec ((CodecComponent)-3)
  176. typedef long CodecType;
  177.  
  178. typedef unsigned short CodecFlags;
  179.  
  180. typedef unsigned long CodecQ;
  181.  
  182.  
  183. enum {
  184.     codecLosslessQuality        = 0x400L,
  185.     codecMaxQuality                = 0x3ffL,
  186.     codecMinQuality                = 0x000L,
  187.     codecLowQuality                = 0x100L,
  188.     codecNormalQuality            = 0x200L,
  189.     codecHighQuality            = 0x300L
  190. };
  191.  
  192. enum {
  193.     codecCompletionSource        = (1 << 0),                        /* asynchronous codec is done with source data */
  194.     codecCompletionDest            = (1 << 1)                        /* asynchronous codec is done with destination data */
  195. };
  196.  
  197. enum {
  198.     codecProgressOpen            = 0,
  199.     codecProgressUpdatePercent    = 1,
  200.     codecProgressClose            = 2
  201. };
  202.  
  203. typedef pascal OSErr (*ICMDataProcPtr)(Ptr *dataP, long bytesNeeded, long refcon);
  204. typedef pascal OSErr (*ICMFlushProcPtr)(Ptr data, long bytesAdded, long refcon);
  205. typedef pascal void (*ICMCompletionProcPtr)(OSErr result, short flags, long refcon);
  206. typedef pascal OSErr (*ICMProgressProcPtr)(short message, Fixed completeness, long refcon);
  207. typedef pascal void (*StdPixProcPtr)(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  208. typedef pascal void (*ICMAlignmentProcPtr)(Rect *rp, long refcon);
  209.  
  210. #if GENERATINGCFM
  211. typedef UniversalProcPtr ICMDataUPP;
  212. typedef UniversalProcPtr ICMFlushUPP;
  213. typedef UniversalProcPtr ICMCompletionUPP;
  214. typedef UniversalProcPtr ICMProgressUPP;
  215. typedef UniversalProcPtr StdPixUPP;
  216. typedef UniversalProcPtr ICMAlignmentUPP;
  217. #else
  218. typedef ICMDataProcPtr ICMDataUPP;
  219. typedef ICMFlushProcPtr ICMFlushUPP;
  220. typedef ICMCompletionProcPtr ICMCompletionUPP;
  221. typedef ICMProgressProcPtr ICMProgressUPP;
  222. typedef StdPixProcPtr StdPixUPP;
  223. typedef ICMAlignmentProcPtr ICMAlignmentUPP;
  224. #endif
  225.  
  226. typedef long ImageSequence;
  227.  
  228. struct ICMProgressProcRecord {
  229.     ICMProgressUPP                    progressProc;
  230.     long                            progressRefCon;
  231. };
  232. typedef struct ICMProgressProcRecord ICMProgressProcRecord, *ICMProgressProcRecordPtr;
  233.  
  234. struct ICMCompletionProcRecord {
  235.     ICMCompletionUPP                completionProc;
  236.     long                            completionRefCon;
  237. };
  238. typedef struct ICMCompletionProcRecord ICMCompletionProcRecord, *ICMCompletionProcRecordPtr;
  239.  
  240. struct ICMDataProcRecord {
  241.     ICMDataUPP                        dataProc;
  242.     long                            dataRefCon;
  243. };
  244. typedef struct ICMDataProcRecord ICMDataProcRecord, *ICMDataProcRecordPtr;
  245.  
  246. struct ICMFlushProcRecord {
  247.     ICMFlushUPP                        flushProc;
  248.     long                            flushRefCon;
  249. };
  250. typedef struct ICMFlushProcRecord ICMFlushProcRecord, *ICMFlushProcRecordPtr;
  251.  
  252. struct ICMAlignmentProcRecord {
  253.     ICMAlignmentUPP                    alignmentProc;
  254.     long                            alignmentRefCon;
  255. };
  256. typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord, *ICMAlignmentProcRecordPtr;
  257.  
  258. struct DataRateParams {
  259.     long                            dataRate;
  260.     long                            dataOverrun;
  261.     long                            frameDuration;
  262.     long                            keyFrameRate;
  263.     CodecQ                            minSpatialQuality;
  264.     CodecQ                            minTemporalQuality;
  265. };
  266. typedef struct DataRateParams DataRateParams, *DataRateParamsPtr;
  267.  
  268. struct ImageDescription {
  269.     long                            idSize;                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data */
  270.     CodecType                        cType;                        /* what kind of codec compressed this data */
  271.     long                            resvd1;                        /* reserved for Apple use */
  272.     short                            resvd2;                        /* reserved for Apple use */
  273.     short                            dataRefIndex;                /* set to zero  */
  274.     short                            version;                    /* which version is this data */
  275.     short                            revisionLevel;                /* what version of that codec did this */
  276.     long                            vendor;                        /* whose  codec compressed this data */
  277.     CodecQ                            temporalQuality;            /* what was the temporal quality factor  */
  278.     CodecQ                            spatialQuality;                /* what was the spatial quality factor */
  279.     short                            width;                        /* how many pixels wide is this data */
  280.     short                            height;                        /* how many pixels high is this data */
  281.     Fixed                            hRes;                        /* horizontal resolution */
  282.     Fixed                            vRes;                        /* vertical resolution */
  283.     long                            dataSize;                    /* if known, the size of data for this image descriptor */
  284.     short                            frameCount;                    /* number of frames this description applies to */
  285.     Str31                            name;                        /* name of codec ( in case not installed )  */
  286.     short                            depth;                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  287.     short                            clutID;                        /* clut id or if 0 clut follows  or -1 if no clut */
  288. };
  289. typedef struct ImageDescription ImageDescription, *ImageDescriptionPtr, **ImageDescriptionHandle;
  290.  
  291. struct CodecInfo {
  292.     Str31                            typeName;                    /* name of the codec type i.e.: 'Apple Image Compression' */
  293.     short                            version;                    /* version of the codec data that this codec knows about */
  294.     short                            revisionLevel;                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  295.     long                            vendor;                        /* Maker of this codec i.e: 'appl' */
  296.     long                            decompressFlags;            /* codecInfo flags for decompression capabilities */
  297.     long                            compressFlags;                /* codecInfo flags for compression capabilities */
  298.     long                            formatFlags;                /* codecInfo flags for compression format details */
  299.     UInt8                            compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  300.     UInt8                            decompressionAccuracy;        /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  301.     unsigned short                    compressionSpeed;            /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  302.     unsigned short                    decompressionSpeed;            /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  303.     UInt8                            compressionLevel;            /* measure (1-255) of compression level of this codec (0 if unknown)  */
  304.     UInt8                            resvd;                        /* pad */
  305.     short                            minimumHeight;                /* minimum height of image (block size) */
  306.     short                            minimumWidth;                /* minimum width of image (block size) */
  307.     short                            decompressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  308.     short                            compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  309.     long                            privateData;
  310. };
  311. typedef struct CodecInfo CodecInfo;
  312.  
  313. struct CodecNameSpec {
  314.     CodecComponent                    codec;
  315.     CodecType                        cType;
  316.     Str31                            typeName;
  317.     Handle                            name;
  318. };
  319. typedef struct CodecNameSpec CodecNameSpec;
  320.  
  321. struct CodecNameSpecList {
  322.     short                            count;
  323.     CodecNameSpec                    list[1];
  324. };
  325. typedef struct CodecNameSpecList CodecNameSpecList, *CodecNameSpecListPtr;
  326.  
  327.  
  328. enum {
  329.     defaultDither                = 0,
  330.     forceDither                    = 1,
  331.     suppressDither                = 2,
  332.     useColorMatching            = 4
  333. };
  334.  
  335. struct ICMFrameTimeRecord {
  336.     wide                            value;                        /* frame time*/
  337.     long                            scale;                        /* timescale of value/duration fields*/
  338.     void                            *base;                        /* timebase*/
  339.     long                            duration;                    /* duration frame is to be displayed (0 if unknown)*/
  340.     Fixed                            rate;                        /* rate of timebase relative to wall-time*/
  341. };
  342. typedef struct ICMFrameTimeRecord ICMFrameTimeRecord, *ICMFrameTimePtr;
  343.  
  344.  
  345. #if GENERATINGCFM
  346. #else
  347. #endif
  348.  
  349. enum {
  350.     uppICMDataProcInfo = kPascalStackBased
  351.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  352.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr*)))
  353.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  354.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  355.     uppICMFlushProcInfo = kPascalStackBased
  356.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  357.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  358.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  359.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  360.     uppICMCompletionProcInfo = kPascalStackBased
  361.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(OSErr)))
  362.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  363.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  364.     uppICMProgressProcInfo = kPascalStackBased
  365.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  366.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  367.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Fixed)))
  368.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long))),
  369.     uppStdPixProcInfo = kPascalStackBased
  370.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PixMap*)))
  371.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  372.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord*)))
  373.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  374.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  375.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(PixMap*)))
  376.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(Rect*)))
  377.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(short))),
  378.     uppICMAlignmentProcInfo = kPascalStackBased
  379.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect*)))
  380.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  381. };
  382.  
  383. #if GENERATINGCFM
  384. #define NewICMDataProc(userRoutine)        \
  385.         (ICMDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  386. #define NewICMFlushProc(userRoutine)        \
  387.         (ICMFlushUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  388. #define NewICMCompletionProc(userRoutine)        \
  389.         (ICMCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  390. #define NewICMProgressProc(userRoutine)        \
  391.         (ICMProgressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  392. #define NewStdPixProc(userRoutine)        \
  393.         (StdPixUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  394. #define NewICMAlignmentProc(userRoutine)        \
  395.         (ICMAlignmentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  396. #else
  397. #define NewICMDataProc(userRoutine)        \
  398.         ((ICMDataUPP) (userRoutine))
  399. #define NewICMFlushProc(userRoutine)        \
  400.         ((ICMFlushUPP) (userRoutine))
  401. #define NewICMCompletionProc(userRoutine)        \
  402.         ((ICMCompletionUPP) (userRoutine))
  403. #define NewICMProgressProc(userRoutine)        \
  404.         ((ICMProgressUPP) (userRoutine))
  405. #define NewStdPixProc(userRoutine)        \
  406.         ((StdPixUPP) (userRoutine))
  407. #define NewICMAlignmentProc(userRoutine)        \
  408.         ((ICMAlignmentUPP) (userRoutine))
  409. #endif
  410.  
  411. #if GENERATINGCFM
  412. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  413.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  414. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  415.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  416. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  417.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMCompletionProcInfo, (result), (flags), (refcon))
  418. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  419.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMProgressProcInfo, (message), (completeness), (refcon))
  420. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  421.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  422. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  423.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppICMAlignmentProcInfo, (rp), (refcon))
  424. #else
  425. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)        \
  426.         (*(userRoutine))((dataP), (bytesNeeded), (refcon))
  427. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)        \
  428.         (*(userRoutine))((data), (bytesAdded), (refcon))
  429. #define CallICMCompletionProc(userRoutine, result, flags, refcon)        \
  430.         (*(userRoutine))((result), (flags), (refcon))
  431. #define CallICMProgressProc(userRoutine, message, completeness, refcon)        \
  432.         (*(userRoutine))((message), (completeness), (refcon))
  433. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)        \
  434.         (*(userRoutine))((src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  435. #define CallICMAlignmentProc(userRoutine, rp, refcon)        \
  436.         (*(userRoutine))((rp), (refcon))
  437. #endif
  438.  
  439. extern pascal OSErr CodecManagerVersion(long *version)
  440.  TWOWORDINLINE(0x7000, 0xAAA3);
  441. extern pascal OSErr GetCodecNameList(CodecNameSpecListPtr *list, short showAll)
  442.  TWOWORDINLINE(0x7001, 0xAAA3);
  443. extern pascal OSErr DisposeCodecNameList(CodecNameSpecListPtr list)
  444.  TWOWORDINLINE(0x700F, 0xAAA3);
  445. extern pascal OSErr GetCodecInfo(CodecInfo *info, CodecType cType, CodecComponent codec)
  446.  TWOWORDINLINE(0x7003, 0xAAA3);
  447. extern pascal OSErr GetMaxCompressionSize(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, long *size)
  448.  TWOWORDINLINE(0x7004, 0xAAA3);
  449. extern pascal OSErr GetCompressionTime(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *compressTime)
  450.  TWOWORDINLINE(0x7005, 0xAAA3);
  451. extern pascal OSErr CompressImage(PixMapHandle src, const Rect *srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data)
  452.  TWOWORDINLINE(0x7006, 0xAAA3);
  453. extern pascal OSErr FCompressImage(PixMapHandle src, const Rect *srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec, CTabHandle clut, CodecFlags flags, long bufferSize, ICMFlushProcRecordPtr flushProc, ICMProgressProcRecordPtr progressProc, ImageDescriptionHandle desc, Ptr data)
  454.  TWOWORDINLINE(0x7007, 0xAAA3);
  455. extern pascal OSErr DecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle mask)
  456.  TWOWORDINLINE(0x7008, 0xAAA3);
  457. extern pascal OSErr FDecompressImage(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapHandle matte, const Rect *matteRect, CodecQ accuracy, DecompressorComponent codec, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  458.  TWOWORDINLINE(0x7009, 0xAAA3);
  459. extern pascal OSErr CompressSequenceBegin(ImageSequence *seqID, PixMapHandle src, PixMapHandle prev, const Rect *srcRect, const Rect *prevRect, short colorDepth, CodecType cType, CompressorComponent codec, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate, CTabHandle clut, CodecFlags flags, ImageDescriptionHandle desc)
  460.  TWOWORDINLINE(0x700A, 0xAAA3);
  461. extern pascal OSErr CompressSequenceFrame(ImageSequence seqID, PixMapHandle src, const Rect *srcRect, CodecFlags flags, Ptr data, long *dataSize, UInt8 *similarity, ICMCompletionProcRecordPtr asyncCompletionProc)
  462.  TWOWORDINLINE(0x700B, 0xAAA3);
  463. extern pascal OSErr DecompressSequenceBegin(ImageSequence *seqID, ImageDescriptionHandle desc, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  464.  TWOWORDINLINE(0x700D, 0xAAA3);
  465. extern pascal OSErr DecompressSequenceBeginS(ImageSequence *seqID, ImageDescriptionHandle desc, Ptr data, long dataSize, CGrafPtr port, GDHandle gdh, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, CodecFlags flags, CodecQ accuracy, DecompressorComponent codec)
  466.  FOURWORDINLINE(0x203C, 0x30, 0x5D, 0xAAA3);
  467. extern pascal OSErr DecompressSequenceFrame(ImageSequence seqID, Ptr data, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  468.  TWOWORDINLINE(0x700E, 0xAAA3);
  469. extern pascal OSErr DecompressSequenceFrameS(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc)
  470.  FOURWORDINLINE(0x203C, 0x16, 0x47, 0xAAA3);
  471. extern pascal OSErr DecompressSequenceFrameWhen(ImageSequence seqID, Ptr data, long dataSize, CodecFlags inFlags, CodecFlags *outFlags, ICMCompletionProcRecordPtr asyncCompletionProc, const ICMFrameTimeRecord *frameTime)
  472.  FOURWORDINLINE(0x203C, 0x1A, 0x5E, 0xAAA3);
  473. extern pascal OSErr CDSequenceFlush(ImageSequence seqID)
  474.  FOURWORDINLINE(0x203C, 0x4, 0x5F, 0xAAA3);
  475. extern pascal OSErr SetDSequenceMatrix(ImageSequence seqID, MatrixRecordPtr matrix)
  476.  TWOWORDINLINE(0x7010, 0xAAA3);
  477. extern pascal OSErr SetDSequenceMatte(ImageSequence seqID, PixMapHandle matte, const Rect *matteRect)
  478.  TWOWORDINLINE(0x7011, 0xAAA3);
  479. extern pascal OSErr SetDSequenceMask(ImageSequence seqID, RgnHandle mask)
  480.  TWOWORDINLINE(0x7012, 0xAAA3);
  481. extern pascal OSErr SetDSequenceTransferMode(ImageSequence seqID, short mode, const RGBColor *opColor)
  482.  TWOWORDINLINE(0x7013, 0xAAA3);
  483. extern pascal OSErr SetDSequenceDataProc(ImageSequence seqID, ICMDataProcRecordPtr dataProc, long bufferSize)
  484.  TWOWORDINLINE(0x7014, 0xAAA3);
  485. extern pascal OSErr SetDSequenceAccuracy(ImageSequence seqID, CodecQ accuracy)
  486.  TWOWORDINLINE(0x7034, 0xAAA3);
  487. extern pascal OSErr SetDSequenceSrcRect(ImageSequence seqID, const Rect *srcRect)
  488.  TWOWORDINLINE(0x7035, 0xAAA3);
  489. extern pascal OSErr GetDSequenceImageBuffer(ImageSequence seqID, GWorldPtr *gworld)
  490.  TWOWORDINLINE(0x7015, 0xAAA3);
  491. extern pascal OSErr GetDSequenceScreenBuffer(ImageSequence seqID, GWorldPtr *gworld)
  492.  TWOWORDINLINE(0x7016, 0xAAA3);
  493. extern pascal OSErr SetCSequenceQuality(ImageSequence seqID, CodecQ spatialQuality, CodecQ temporalQuality)
  494.  TWOWORDINLINE(0x7017, 0xAAA3);
  495. extern pascal OSErr SetCSequencePrev(ImageSequence seqID, PixMapHandle prev, const Rect *prevRect)
  496.  TWOWORDINLINE(0x7018, 0xAAA3);
  497. extern pascal OSErr SetCSequenceFlushProc(ImageSequence seqID, ICMFlushProcRecordPtr flushProc, long bufferSize)
  498.  TWOWORDINLINE(0x7033, 0xAAA3);
  499. extern pascal OSErr SetCSequenceKeyFrameRate(ImageSequence seqID, long keyframerate)
  500.  TWOWORDINLINE(0x7036, 0xAAA3);
  501. extern pascal OSErr GetCSequenceKeyFrameRate(ImageSequence seqID, long *keyframerate)
  502.  FOURWORDINLINE(0x203C, 0x8, 0x4B, 0xAAA3);
  503. extern pascal OSErr GetCSequencePrevBuffer(ImageSequence seqID, GWorldPtr *gworld)
  504.  TWOWORDINLINE(0x7019, 0xAAA3);
  505. extern pascal OSErr CDSequenceBusy(ImageSequence seqID)
  506.  TWOWORDINLINE(0x701A, 0xAAA3);
  507. extern pascal OSErr CDSequenceEnd(ImageSequence seqID)
  508.  TWOWORDINLINE(0x701B, 0xAAA3);
  509. extern pascal OSErr GetCompressedImageSize(ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  510.  TWOWORDINLINE(0x701C, 0xAAA3);
  511. extern pascal OSErr GetSimilarity(PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  512.  TWOWORDINLINE(0x701D, 0xAAA3);
  513. extern pascal OSErr GetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle *ctable)
  514.  TWOWORDINLINE(0x701E, 0xAAA3);
  515. extern pascal OSErr SetImageDescriptionCTable(ImageDescriptionHandle desc, CTabHandle ctable)
  516.  TWOWORDINLINE(0x701F, 0xAAA3);
  517. extern pascal OSErr GetImageDescriptionExtension(ImageDescriptionHandle desc, Handle *extension, long idType, long index)
  518.  TWOWORDINLINE(0x7020, 0xAAA3);
  519. extern pascal OSErr SetImageDescriptionExtension(ImageDescriptionHandle desc, Handle extension, long idType)
  520.  TWOWORDINLINE(0x7021, 0xAAA3);
  521. extern pascal OSErr RemoveImageDescriptionExtension(ImageDescription **desc, long idType, long index)
  522.  FOURWORDINLINE(0x203C, 0xC, 0x3A, 0xAAA3);
  523. extern pascal OSErr CountImageDescriptionExtensionType(ImageDescription **desc, long idType, long *count)
  524.  FOURWORDINLINE(0x203C, 0xC, 0x3B, 0xAAA3);
  525. extern pascal OSErr GetNextImageDescriptionExtensionType(ImageDescription **desc, long *idType)
  526.  FOURWORDINLINE(0x203C, 0x8, 0x3C, 0xAAA3);
  527. extern pascal OSErr FindCodec(CodecType cType, CodecComponent specCodec, CompressorComponent *compressor, DecompressorComponent *decompressor)
  528.  TWOWORDINLINE(0x7023, 0xAAA3);
  529. extern pascal OSErr CompressPicture(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType)
  530.  TWOWORDINLINE(0x7024, 0xAAA3);
  531. extern pascal OSErr FCompressPicture(PicHandle srcPicture, PicHandle dstPicture, short colorDepth, CTabHandle clut, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  532.  TWOWORDINLINE(0x7025, 0xAAA3);
  533. extern pascal OSErr CompressPictureFile(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType)
  534.  TWOWORDINLINE(0x7026, 0xAAA3);
  535. extern pascal OSErr FCompressPictureFile(short srcRefNum, short dstRefNum, short colorDepth, CTabHandle clut, CodecQ quality, short doDither, short compressAgain, ICMProgressProcRecordPtr progressProc, CodecType cType, CompressorComponent codec)
  536.  TWOWORDINLINE(0x7027, 0xAAA3);
  537. extern pascal OSErr GetPictureFileHeader(short refNum, Rect *frame, OpenCPicParams *header)
  538.  TWOWORDINLINE(0x7028, 0xAAA3);
  539. extern pascal OSErr DrawPictureFile(short refNum, const Rect *frame, ICMProgressProcRecordPtr progressProc)
  540.  TWOWORDINLINE(0x7029, 0xAAA3);
  541. extern pascal OSErr DrawTrimmedPicture(PicHandle srcPicture, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  542.  TWOWORDINLINE(0x702E, 0xAAA3);
  543. extern pascal OSErr DrawTrimmedPictureFile(short srcRefnum, const Rect *frame, RgnHandle trimMask, short doDither, ICMProgressProcRecordPtr progressProc)
  544.  TWOWORDINLINE(0x702F, 0xAAA3);
  545. extern pascal OSErr MakeThumbnailFromPicture(PicHandle picture, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  546.  TWOWORDINLINE(0x702A, 0xAAA3);
  547. extern pascal OSErr MakeThumbnailFromPictureFile(short refNum, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  548.  TWOWORDINLINE(0x702B, 0xAAA3);
  549. extern pascal OSErr MakeThumbnailFromPixMap(PixMapHandle src, const Rect *srcRect, short colorDepth, PicHandle thumbnail, ICMProgressProcRecordPtr progressProc)
  550.  TWOWORDINLINE(0x702C, 0xAAA3);
  551. extern pascal OSErr TrimImage(ImageDescriptionHandle desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  552.  TWOWORDINLINE(0x702D, 0xAAA3);
  553. extern pascal OSErr ConvertImage(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle clut, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData)
  554.  TWOWORDINLINE(0x7030, 0xAAA3);
  555. extern pascal OSErr GetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle *desc, Ptr *data, long *bufferSize, ICMDataProcRecord *dataProc, ICMProgressProcRecord *progressProc)
  556.  TWOWORDINLINE(0x7037, 0xAAA3);
  557. extern pascal OSErr SetCompressedPixMapInfo(PixMapPtr pix, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, ICMProgressProcRecordPtr progressProc)
  558.  TWOWORDINLINE(0x7038, 0xAAA3);
  559. extern pascal void StdPix(PixMapPtr src, const Rect *srcRect, MatrixRecordPtr matrix, short mode, RgnHandle mask, PixMapPtr matte, const Rect *matteRect, short flags)
  560.  TWOWORDINLINE(0x700C, 0xAAA3);
  561. extern pascal OSErr TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  562.  TWOWORDINLINE(0x7039, 0xAAA3);
  563. /***********
  564.     preview stuff
  565. ***********/
  566. extern pascal void SFGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply)
  567.  TWOWORDINLINE(0x7041, 0xAAA3);
  568. extern pascal void SFPGetFilePreview(Point where, ConstStr255Param prompt, FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, DlgHookUPP dlgHook, SFReply *reply, short dlgID, ModalFilterUPP filterProc)
  569.  TWOWORDINLINE(0x7042, 0xAAA3);
  570. extern pascal void StandardGetFilePreview(FileFilterUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply)
  571.  TWOWORDINLINE(0x7043, 0xAAA3);
  572. extern pascal void CustomGetFilePreview(FileFilterYDUPP fileFilter, short numTypes, ConstSFTypeListPtr typeList, StandardFileReply *reply, short dlgID, Point where, DlgHookYDUPP dlgHook, ModalFilterYDUPP filterProc, ActivationOrderListPtr activeList, ActivateYDUPP activateProc, void *yourDataPtr)
  573.  TWOWORDINLINE(0x7044, 0xAAA3);
  574. extern pascal OSErr MakeFilePreview(short resRefNum, ICMProgressProcRecordPtr progress)
  575.  TWOWORDINLINE(0x7045, 0xAAA3);
  576. extern pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  577.  TWOWORDINLINE(0x7046, 0xAAA3);
  578.  
  579. enum {
  580.     sfpItemPreviewAreaUser        = 11,
  581.     sfpItemPreviewStaticText    = 12,
  582.     sfpItemPreviewDividerUser    = 13,
  583.     sfpItemCreatePreviewButton    = 14,
  584.     sfpItemShowPreviewButton    = 15
  585. };
  586.  
  587. struct PreviewResourceRecord {
  588.     unsigned long                    modDate;
  589.     short                            version;
  590.     OSType                            resType;
  591.     short                            resID;
  592. };
  593. typedef struct PreviewResourceRecord PreviewResourceRecord, *PreviewResourcePtr, **PreviewResource;
  594.  
  595. extern pascal void AlignScreenRect(Rect *rp, ICMAlignmentProcRecordPtr alignmentProc)
  596.  FOURWORDINLINE(0x203C, 0x8, 0x4C, 0xAAA3);
  597. extern pascal void AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  598.  FOURWORDINLINE(0x203C, 0xE, 0x4D, 0xAAA3);
  599. extern pascal void DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  600.  FOURWORDINLINE(0x203C, 0x14, 0x4E, 0xAAA3);
  601. extern pascal long DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect, Rect *slopRect, short axis, UniversalProcPtr actionProc, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
  602.  FOURWORDINLINE(0x203C, 0x1E, 0x4F, 0xAAA3);
  603. extern pascal OSErr SetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  604.  FOURWORDINLINE(0x203C, 0x8, 0x50, 0xAAA3);
  605. extern pascal OSErr SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  606.  FOURWORDINLINE(0x203C, 0x8, 0x51, 0xAAA3);
  607. extern pascal QDErr NewImageGWorld(GWorldPtr *gworld, ImageDescriptionHandle idh, GWorldFlags flags)
  608.  FOURWORDINLINE(0x203C, 0xC, 0x52, 0xAAA3);
  609. extern pascal OSErr GetCSequenceDataRateParams(ImageSequence seqID, DataRateParamsPtr params)
  610.  FOURWORDINLINE(0x203C, 0x8, 0x53, 0xAAA3);
  611. extern pascal OSErr GetCSequenceFrameNumber(ImageSequence seqID, long *frameNumber)
  612.  FOURWORDINLINE(0x203C, 0x8, 0x54, 0xAAA3);
  613. extern pascal OSErr GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  614.  FOURWORDINLINE(0x203C, 0x8, 0x55, 0xAAA3);
  615. extern pascal OSErr SetSequenceProgressProc(ImageSequence seqID, ICMProgressProcRecord *progressProc)
  616.  FOURWORDINLINE(0x203C, 0x8, 0x56, 0xAAA3);
  617. extern pascal OSErr GDHasScale(GDHandle gdh, short depth, Fixed *scale)
  618.  FOURWORDINLINE(0x203C, 0xA, 0x5A, 0xAAA3);
  619. extern pascal OSErr GDGetScale(GDHandle gdh, Fixed *scale, short *flags)
  620.  FOURWORDINLINE(0x203C, 0xC, 0x5B, 0xAAA3);
  621. extern pascal OSErr GDSetScale(GDHandle gdh, Fixed scale, short flags)
  622.  FOURWORDINLINE(0x203C, 0xA, 0x5C, 0xAAA3);
  623. extern pascal OSErr ICMShieldSequenceCursor(ImageSequence seqID)
  624.  FOURWORDINLINE(0x203C, 0x4, 0x62, 0xAAA3);
  625. extern pascal void ICMDecompressComplete(ImageSequence seqID, OSErr err, short flag, ICMCompletionProcRecordPtr completionRtn)
  626.  FOURWORDINLINE(0x203C, 0xC, 0x63, 0xAAA3);
  627. extern pascal OSErr SetDSequenceTimeCode(ImageSequence seqID, void *timeCodeFormat, void *timeCodeTime)
  628.  FOURWORDINLINE(0x203C, 0xC, 0x64, 0xAAA3);
  629.  
  630. enum {
  631.     identityMatrixType            = 0x00,                            /* result if matrix is identity */
  632.     translateMatrixType            = 0x01,                            /* result if matrix translates */
  633.     scaleMatrixType                = 0x02,                            /* result if matrix scales */
  634.     scaleTranslateMatrixType    = 0x03,                            /* result if matrix scales and translates */
  635.     linearMatrixType            = 0x04,                            /* result if matrix is general 2 x 2 */
  636.     linearTranslateMatrixType    = 0x05,                            /* result if matrix is general 2 x 2 and translates */
  637.     perspectiveMatrixType        = 0x06                            /* result if matrix is general 3 x 3 */
  638. };
  639.  
  640. typedef unsigned short MatrixFlags;
  641.  
  642. extern pascal short GetMatrixType(const MatrixRecord *m)
  643.  TWOWORDINLINE(0x7014, 0xABC2);
  644. extern pascal void CopyMatrix(const MatrixRecord *m1, MatrixRecord *m2)
  645.  TWOWORDINLINE(0x7020, 0xABC2);
  646. extern pascal Boolean EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  647.  TWOWORDINLINE(0x7021, 0xABC2);
  648. extern pascal void SetIdentityMatrix(MatrixRecord *matrix)
  649.  TWOWORDINLINE(0x7015, 0xABC2);
  650. extern pascal void TranslateMatrix(MatrixRecord *m, Fixed deltaH, Fixed deltaV)
  651.  TWOWORDINLINE(0x7019, 0xABC2);
  652. extern pascal void RotateMatrix(MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY)
  653.  TWOWORDINLINE(0x7016, 0xABC2);
  654. extern pascal void ScaleMatrix(MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY)
  655.  TWOWORDINLINE(0x7017, 0xABC2);
  656. extern pascal void SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  657.  TWOWORDINLINE(0x7018, 0xABC2);
  658. extern pascal OSErr TransformFixedPoints(const MatrixRecord *m, FixedPoint *fpt, long count)
  659.  TWOWORDINLINE(0x7022, 0xABC2);
  660. extern pascal OSErr TransformPoints(const MatrixRecord *mp, Point *pt1, long count)
  661.  TWOWORDINLINE(0x7023, 0xABC2);
  662. extern pascal Boolean TransformFixedRect(const MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  663.  TWOWORDINLINE(0x7024, 0xABC2);
  664. extern pascal Boolean TransformRect(const MatrixRecord *m, Rect *r, FixedPoint *fpp)
  665.  TWOWORDINLINE(0x7025, 0xABC2);
  666. extern pascal Boolean InverseMatrix(const MatrixRecord *m, MatrixRecord *im)
  667.  TWOWORDINLINE(0x701C, 0xABC2);
  668. extern pascal void ConcatMatrix(const MatrixRecord *a, MatrixRecord *b)
  669.  TWOWORDINLINE(0x701B, 0xABC2);
  670. extern pascal void RectMatrix(MatrixRecord *matrix, const Rect *srcRect, const Rect *dstRect)
  671.  TWOWORDINLINE(0x701E, 0xABC2);
  672. extern pascal void MapMatrix(MatrixRecord *matrix, const Rect *fromRect, const Rect *toRect)
  673.  TWOWORDINLINE(0x701D, 0xABC2);
  674.  
  675. #if PRAGMA_IMPORT_SUPPORTED
  676. #pragma import off
  677. #endif
  678.  
  679. #if PRAGMA_ALIGN_SUPPORTED
  680. #pragma options align=reset
  681. #endif
  682.  
  683. #ifdef __cplusplus
  684. }
  685. #endif
  686.  
  687. #endif /* __IMAGECOMPRESSION__ */
  688.